<template>
    <div>
        <Card dis-hover :style="{minHeight: height+'px'}">
            <div class="title" slot="title">
                <div>
                    <Icon :type="icon" class="icon"/>
                    {{title}}
                </div>
            </div>
            <ul>
                <li v-for="item in list">
                    <div class="item-box">
                        <div class="item-title">
                            {{item.title}}
                        </div>
                        <div>[{{item.createTime}}]</div>
                    </div>
                </li>
            </ul>
        </Card>
    </div>
</template>

<script>
    export default {
        name: "panel-top",
        props: {
            height: {
                type: Number,
                default: 300
            },
            title: {
                type: String,
                default: "标题"
            },
            list: {
                type: Array,
                default: []
            },
            icon: {
                type: String,
                default: "ios-book"
            },
            dataType: {
                type: String,
                default: ""
            }
        },
        methods: {

        }
    }
</script>

<style scoped>
    .item-box {
        display: flex;
        justify-content: space-between;
    }

    ul {
        margin: 0 0 0 10px;
    }

    ul li {
        padding: 3px 0;
    }

    .title {
        font-size: 16px;
        display: flex;
        justify-content: space-between;
        padding-top: 5px;

    }

    .icon {
        font-size: 18px;
    }

    .more {
        cursor: pointer;
        margin-top: -5px;
    }

    .item-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    a {
        color: #515a6e;
    }
    a:hover{
        color: #2d8cf0;
    }
</style>